package com.lx.app.controller;

import com.lx.Remessages;
import com.lx.Request;
import com.lx.Response;
import com.lx.service.DemoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;

import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by lanyxp on 2021/2/24 15:49
 */
@RestController
@RequestMapping(value = "/demo/test")
@Api(tags = "测试类")
@RequiredArgsConstructor
public class DemoController {

    private final DemoService demoService;

    @ApiOperation(value = "测试类")
    @RequestMapping("/add")
    public Response addTest(@RequestBody Request request) {
        boolean result = demoService.demoTestTransaction();
        return Remessages.success(result);
    }

}
